﻿CREATE TABLE [dbo].[UMConversie] (
    [IDUMSursa] SMALLINT   NOT NULL,
    [IDUMDest]  SMALLINT   NOT NULL,
    [Factor]    FLOAT (53) CONSTRAINT [DF_UMConversie_Factor] DEFAULT ((1)) NOT NULL,
    [IDArticol] INT        CONSTRAINT [DF_UMConversie_IDArticol] DEFAULT ((0)) NOT NULL,
    CONSTRAINT [PK_UMConversie] PRIMARY KEY CLUSTERED ([IDUMSursa] ASC, [IDUMDest] ASC, [IDArticol] ASC),
    CONSTRAINT [FK_UMConversie_Articole] FOREIGN KEY ([IDArticol]) REFERENCES [dbo].[Articole] ([IDArticol]),
    CONSTRAINT [FK_UMConversie_UnitatiMasura] FOREIGN KEY ([IDUMSursa]) REFERENCES [dbo].[UnitatiMasura] ([IDUnitateMasura]),
    CONSTRAINT [FK_UMConversie_UnitatiMasura1] FOREIGN KEY ([IDUMDest]) REFERENCES [dbo].[UnitatiMasura] ([IDUnitateMasura])
);

